Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fabric, lists): disable view flattening in VirtualizedList #2292

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

Saadnajmi
Copy link
Collaborator

This is part of a series of PRs where we are cherry-picking fixes from #2117 to update our Fabric implementation on macOS.

Summary:

Pick a few commits that disable view flattening in Flatlist / VirtualizedList

Test Plan:

CI should pass

@Saadnajmi Saadnajmi requested a review from a team as a code owner November 21, 2024 19:00
@Saadnajmi Saadnajmi force-pushed the fabric/flatlist branch 3 times, most recently from 0753449 to f7a8d4a Compare November 21, 2024 21:50
Nick Lefever added 2 commits November 27, 2024 20:49
Summary:
Scroll views set up with an inverted vertical axis can't support view flattening due to the flattening not taking the axis inversion in consideration while repositioning the views.

This diff disables view flattening on the cells of the virtualized list so that the layout would be correct in inverted scroll views when using Fabric.

The change is not being applied to ScrollView directly because we can safely assume that vertical axis inversion will only be enabled on VirtualizedList/FlatList.

Test Plan:
Run Zeratul with Fabric and check that the vertical order of grouped bubble messages is correct.

| Before | After |
|--|
|  {F1136386200}  |  {F1136386364}  |

Reviewers: shawndempsey, #rn-desktop

Reviewed By: shawndempsey

Differential Revision: https://phabricator.intern.facebook.com/D50846483

Tasks: T167539420
…ents of VirtualizedList

Summary:
View flattening was already disabled in the cell renderer used by the Virtualized List in this diff D50846483

This diff disables view flattening in the header, footer, empty and spacer cells to fix the layout being broken because of the vertical axis flipping used by the reverse order virtualized list.

Test Plan:
Run Zeratul with Fabric enabled and scroll to the top of a message thread to show the participants summary header.

| Before | After |
|--|
|  {F1145726580}  |  {F1145726618}  |

Reviewers: shawndempsey, chpurrer, #rn-desktop

Reviewed By: chpurrer

Differential Revision: https://phabricator.intern.facebook.com/D51182545

Tasks: T167539420
@Saadnajmi Saadnajmi merged commit 6539a8b into microsoft:main Nov 28, 2024
14 checks passed
@Saadnajmi Saadnajmi deleted the fabric/flatlist branch November 28, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants